package org.meteorshower.employee_depart.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.sf.jsqlparser.util.validation.metadata.DatabaseException;
import org.meteorshower.employee_depart.dao.IEmployeeDao;
import org.meteorshower.employee_depart.entity.Employee;
import org.meteorshower.employee_depart.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class EmployeeServiceImpl extends ServiceImpl<IEmployeeDao, Employee> implements EmployeeService {

//    @Autowired
//    private IEmployeeDao employeeDao;
//
//
//    @Override
//    public boolean insert(Employee employee) {
//        return employeeDao.insert(employee)>0;
//    }
//
//    @Override
//    public boolean insertBatch(List<Employee> employees) {
//        return employeeDao.batchInsert(employees)>0;
//    }
//
//    @Override
//    public boolean update(Employee employee) {
//        return employeeDao.update(employee)>0;
//    }
//
//    @Override
//    public boolean updateBatch(List<Employee> employees) {
//        return employeeDao.batchUpdate(employees)>0;
//    }
//
//    @Override
//    public boolean remove(String id) {
//        return employeeDao.delete(id)>0;
//    }
//
//    @Override
//    public boolean removeBatch(List<String> ids) {
//        return employeeDao.batchDelete(ids)>0;
//    }
//
//    @Override
//    public Employee getEmployeeById(String employeeId) {
//        return employeeDao.getById(employeeId);
//    }
//
//    @Override
//    public List<Employee> getAll() {
//        return employeeDao.listObjs();
//    }
}
